package top.healthylife.gateway.platform.tc.api.api;


import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import top.healthylife.gateway.core.service.ParentFace;
import top.healthylife.gateway.dto.annotation.ApiServiceExplain;
import top.healthylife.gateway.platform.tc.api.util.TcHttpUtil;
import top.healthylife.gateway.platform.tc.dto.operator3.req.TcReqOperatorThreeElementsVerificationDto;
import top.healthylife.gateway.platform.tc.dto.operator3.res.TcResOperatorThreeElementsVerificationDto;

/**
 * @author GaoZeXi
 * @date 2021/7/20 13:19
 */
@Slf4j
@Service
@ApiServiceExplain(price = 20, apiName = "运营商三要素验证",docUrl = "http://api.tcredit.com/norns/service/cas/doLogin" +
        "?service=http://api.tcredit.com/odin/user/sso", info = "对输⼊⾝份证号和姓名进⾏认证，返回认证结果")
public class TcOperatorThreeElementsVerificationApi implements ParentFace<TcReqOperatorThreeElementsVerificationDto, TcResOperatorThreeElementsVerificationDto> {

    static final String URL = "http://api.ypcredit.com/mobile/verifyMobileInfo3C_t";

    @Override
    public TcResOperatorThreeElementsVerificationDto execute(TcReqOperatorThreeElementsVerificationDto dto) {
        return TcHttpUtil.getApiData(URL,dto,TcResOperatorThreeElementsVerificationDto.class);
    }
}
